<?php $this->load->view('common/cms-head'); ?>
<!--Body top CRV PART STARTS HERE-->
<article id="content">
    <div class="pgwrapper">
    <!--Body top CRV PART Ends HERE-->
<div class="w960 bg1 p15 bx_shw">
	<table width="100%" border="0" cellpadding="0" cellspacing="0"
		align="center">
		<tr>
			<td width="20%" style="border-right: 2px solid #e5e5e5;" valign="top">
			<?php $this->load->view('enterprises/leftnavCMS'); ?>
			</td>
			<td width="80%" style="padding:5px;" valign="top">
				
					<table cellpadding="5" cellspacing="1" bgcolor="#CCC"
						id="formTable" width="99%" align="center">
						<tr>
							<td style="background: #e2e2e2" class="txt-blck"><strong>Username</strong>
							</td>
							<td style="background: #e2e2e2" width="70" class="txt-blck"><strong>Action</strong>
							</td>
						</tr>
						<?php foreach ($allUsersArray as $temp){ ?>
						<tr>
							<td class="txt-blck"><?php echo $temp['user_username']; ?></td>
							<td align="center"><a
								href="/deleteUser/<?php echo $temp['user_id']; ?>"><img
									src="/public/images/delete.jpg" width="15" title="Delete"
									alt="Delete" /> </a>
							</td>
						</tr>
						<?php } ?>
					</table>
				</div>

				<form name="UserForm" action="/insertUser"
					onsubmit="return validateForm()" method="POST">
					<table cellpadding="5" cellspacing="1" bgcolor="#FFFFFF"
						id="formTable" width="100%">
						<tr>
							<td align="right" width="150" class="txt-blck4">Username: <span
								class="r">*</span>
							</td>
							<td><input type="text" name="username" /></td>
						</tr>
						<tr>
							<td align="right" width="150" valign="top" class="txt-blck4">Password:
								<span class="r">*</span></td>
							<td><input type="password" name="password" /></td>
						</tr>
						<tr>
							<td align="right" width="150">&nbsp;</td>
							<td><input type="hidden" value="addUser" name="addUser" /> <input
								type="submit" value="Submit" />
							</td>
						</tr>
					</table>
				</form> 
			</td>
		</tr>
	</table>
</div>
  </div>
</article>
<!--Body BTM CRV PART STARTS HERE-->
     
    <!--Body BTM CRV PART Ends HERE-->
    <div class="clr-both spacer-10">&nbsp;</div>
<?php $this->load->view('common/cms-footer'); ?>
 

<script>
function validateForm()
{
var x=document.forms["UserForm"]["username"].value;
if (x==null || x=="")
  {
  alert("Username must be filled out");
  return false;
  }
var y=document.forms["UserForm"]["password"].value;
if (y==null || y=="")
  {
  alert("Password must be filled out");
  return false;
  }


}

</script>